{% extends "base.html" %}

{% block script %}
    <script>
        var i = 5;
        $(function () {
            show();
            $("#next_link").attr("href", '{{ next_link }}');
        });
        function show() {
            i -= 1;
            $("#seconds").text(i);
            if (i == 0) {
                location.href = '{{ next_link }}';
            }
            window.setTimeout("show()", 1000);
        }
    </script>
{% endblock %}
{% block content %}
    <h3>{{ message }}</h3>
    <h5>Browser will redirect to right page in <span id="seconds"></span> seconds. If it doesn't auto-redirect, please
        click
        <a id="next_link">here</a>..
    </h5>
{% endblock %}